package com.zxf.stockservice.service;

import com.zxf.orderservice.feign.StockService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StockServiceImpl implements StockService {

    @PostMapping("/stock/deduct/{productId}/{stockCount}")
    public String deductStock(@PathVariable("productId")Long productId, @PathVariable("stockCount") Integer stockCount) {
        System.out.println("商品ID="+productId+":扣减库存"+stockCount);
        return null;
    }
}
